package com.example.luckysystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

/**
 * @version 1.0
 * @Author shangjialu
 * @Date 2024/12/8 18:09
 * @注释
 */
@Getter
@AllArgsConstructor
public enum UserIdentityEnum {
    ADMIN("管理员"),
    NORMAL("普通用户");

    private final String message;

    public static UserIdentityEnum forName(String identity){
        for (UserIdentityEnum userIdentityEnum:UserIdentityEnum.values()) {
            if (userIdentityEnum.name().equalsIgnoreCase(identity)){
                return userIdentityEnum;
            }
        }
        return null;
    }

}
